package com.xca.znb.presenter;

import com.xca.znb.entity.Collect;
import com.xca.znb.entity.News;
import com.xca.znb.entity.User;
import com.xca.znb.model.imodel.IShowNews;

public class ShowNewsPresenter {
    private IShowNews iShowNews ;
    public ShowNewsPresenter(IShowNews iShowNews){
        this.iShowNews = iShowNews ;
    }

    public News getNewsById(int id){
        return iShowNews.getNewsById(id);
    }
    public User getUserByPhone(String phone){
        return iShowNews.getUserByPhone(phone);
    }

    public void addCollect(String gId, String type, String user) {
        iShowNews.addCollect(gId, type, user);
    }

    public void delCollect(int id) {
        iShowNews.delCollect(id);
    }

    public Collect getCollect(String gId, String type, String user) {
        return iShowNews.getCollect(gId, type, user);
    }
}
